class Table < Serializable

  attr_reader :source

  def initialize
    @source = []
  end

  def put(card)
      @source.push(card)
  end

  def clear
    @source.clear
  end

  def empty?
    return @source.empty?
  end

  def full?
    @source.length >= 12
  end

  def receive_all
    result = [].concat(@source)
    @source.clear
    return result
  end

end